﻿<%@ Page CodeFileBaseClass="AliCMS.Lib.SystemPageBase" %>
<ali:Get ID="Order" Object="Order" InnerID="Request.QueryString['ID']" Validate="True" />
<section data-page="order_view" data-title="查看订单" data-lang="<%=ContentLang%>">
	<dl class="path1">
		<dt><span>您的位置：</span><a href="list.aspx?Lang=<%=ContentLang%>" target="ali-navtab">订单列表</a> → <b><%=Order[No]%></b></dt>
		<dd>
			<select data-class="<%=ContentLang%>Font" data-ali-widget="combo">
				<ali:List Mark="System" Object="Language" Source="Manager.Languages">
					<ali:Record>
						<%If Convert.ToString(Ab) == ContentLang%>
							<option value="<%=Ab%>" selected><%=[AliCMS.SystemModule.Alias.Language.Name + PageLang]%></option>
						<%Else%>
							<option value="<%=Ab%>"><%=[AliCMS.SystemModule.Alias.Language.Name + PageLang]%></option>
						<%EndIf%>
					</ali:Record>
				</ali:List>
			</select>
		</dd>
	</dl>
	<form class="post">
		<div class="post-body">
			<div class="section1">
				<h1>基本信息</h1>
				<table class="post-table margin2">
					<tr>
						<th>订单号码：</th>
						<td><%=Order[No]%></td>
					</tr>
					<tr>
						<th>订单总价：</th>
						<td><%=Convert.ToDecimal(Order[Sum]).ToString("0.00")%></td>
					</tr>
					<tr>
						<th>用户名：</th>
						<td>
							<img src="<%=Order[UserHead]%>" style="width:22px;height:22px;vertical-align:middle"> <%=Order[UserNickname]%>
						</td>
					</tr>
					<tr>
						<th>课程名称：</th>
						<td><%=Order[CourseName]%></td>
					</tr>
				</table>
			</div>

			<div class="section1">
				<h1>支付信息</h1>
				<table class="post-table margin2">
					<tr>
						<th>付款状态：</th>
						<td>
							<%If Convert.ToInt32(Order[IsPayed]) == 0%>
								未付款
							<%ElseIf Convert.ToInt32(Order[IsPayed]) == 1%>
								部分付款
							<%ElseIf Convert.ToInt32(Order[IsPayed]) == 2%>
								已付款
							<%ElseIf Convert.ToInt32(Order[IsPayed]) == 3%>
								部分退款
							<%ElseIf Convert.ToInt32(Order[IsPayed]) == 4%>
								已退款
							<%EndIf%>
						</td>
					</tr>
					<%If Convert.ToInt32(Order[IsPayed]) > 0%>
						<tr><th>支付时间：</th><td><%=Order[PayTime]%></td></tr>
						<%If Convert.ToInt32(Order[IsPayed]) == 2 && Convert.ToString(Order[PaymentName]) == ""%>
							<tr><th>支付方式：</th><td>余额支付</td></tr>
							<tr><th>支付账号：</th><td><%=Order[UserID]%></td></tr>
						<%Else%>
							<tr><th>支付方式：</th><td><%=Order[PaymentName]%></td></tr>
							<tr><th>支付账号：</th><td><%=Order[PaymentAccountNo]%></td></tr>
						<%EndIf%>
					<%EndIf%>
					
					<%If Convert.ToInt32(Order[IsPayed]) == 3 || Convert.ToInt32(Order[IsPayed]) == 4%>
						<tr><th>退款时间：</th><td><%=Order[RefundTime]%></td></tr>
						<tr><th>退款备注：</th><td><%=Order[RefundMemo]%></td></tr>
					<%EndIf%>
				</table>
			</div>

			<div class="section1">
				<h1>发货信息</h1>
				<table class="post-table margin2">
					<tr>
						<th>发货状态：</th>
						<td>
							<%If Convert.ToInt32(Order[IsDelivered]) == 0%>
								未发货
							<%ElseIf Convert.ToInt32(Order[IsDelivered]) == 1 || Convert.ToInt32(Order[IsDelivered]) == 2%>
								已发货
							<%ElseIf Convert.ToInt32(Order[IsDelivered]) == 3%>
								已退货
							<%EndIf%>
						</td>
					</tr>
					<%If Convert.ToInt32(Order[IsDelivered]) > 0%>
						<tr><th>发货时间：</th><td><%=Order[DeliverTime]%></td></tr>
						<tr><th>发货备注：</th><td><%=Order[DeliverMemo]%></td></tr>
					<%EndIf%>
					
					<%If Convert.ToInt32(Order[IsDelivered]) == 5%>
						<tr><th>退货时间：</th><td><%=Order[ReturnTime]%></td></tr>
						<tr><th>退货备注：</th><td><%=Order[ReturnMemo]%></td></tr>
					<%EndIf%>
				</table>
			</div>

			<div class="section1">
				<h1>代理信息</h1>
				<table class="post-table margin2">
					<tr>
						<th>是否代理销售：</th>
						<td><%If Convert.ToBoolean(Order[DistributerIsAgent])%>是<%Else%>否<%EndIf%></td>
					</tr>
					<%If Convert.ToBoolean(Order[DistributerIsAgent])%>
						<tr>
							<th>代理名称：</th>
							<td>
								<img src="<%=Order[DistributerHead]%>" style="width:22px;height:22px;vertical-align:middle"> <%=Order[DistributerNickname]%>
							</td>
						</tr>
						<tr>
							<th>代理提成：</th>
							<td><%=Convert.ToDecimal(Order[AgentCommision]).ToString("0.00")%></td>
						</tr>
					<%EndIf%>
				</table>
			</div>
		</div>
	</form>
</section>